/**
 * 
 */
package com.zhiteng.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * Title: AdjustBill.java
 * </p>
 * <p>
 * Description: 调课单实体
 * </p>
 * 
 * @author dragon
 * @date 2018年12月4日
 * @version 1.0
 */
/**
 * @author BOB
 *
 */
/**
 * @author BOB
 *
 */
@Table(name = "tb_adjustbill")
public class AdjustBill implements Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	private String school_id; // 学校id
	private String teacher_id; // 教师id
	private String teacher_name;// 请求老师的名字
	private String reason; // 调代课原因
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date adjust_date; // 调课日期
	private String week;// 星期几
	private String old_subject; // 原科目
	private String old_class; // 原班级
	private Integer old_node; // 原节次
	private String grade_name;// 原年级
	private String petitioner_id;// 被请求老师的id
	private String petitioner_name;// 被请求老师的名字
	private String petitioner_subject;// 被请求老师的科目
	private Integer course_num; // 节次(第几节课，被请求老师的)
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date petitioner_date; // 被调课日期
	private String petitioner_week;// 被调课的星期几
	private String petitioner_gradename;// 被请求的年级

	private String petitioner_class;// 被请求老师的班级

	private String remarks;// 备注
	private Integer status; // 请假单状态：0.开始审批(审批中) 1.审批通过 2.审批不通过
							// -1：已撤回（撤回删除tb_procins中记录，但不删除tb_leavebill中记录）

	private Integer revocable; // 是否可撤销，0-可撤销，1-不可撤销；默认值0，可撤销

	private Integer type;// 用于区分电脑端和手机端,2是电脑端,1是手机端

	private Integer type2;// 1是调课.2是代课

	private Date createDate; // 申请单创建时间

	public AdjustBill() {
		super();
		// TODO Auto-generated constructor stub
	}

	public AdjustBill(Long id, String school_id, String teacher_id, String teacher_name, String reason,
			Date adjust_date, String week, String old_subject, String old_class, Integer old_node, String grade_name,
			String petitioner_id, String petitioner_name, String petitioner_subject, Integer course_num,
			Date petitioner_date, String petitioner_week, String petitioner_gradename, String petitioner_class,
			String remarks, Integer status, Integer revocable, Integer type, Integer type2, Date createDate) {
		super();
		this.id = id;
		this.school_id = school_id;
		this.teacher_id = teacher_id;
		this.teacher_name = teacher_name;
		this.reason = reason;
		this.adjust_date = adjust_date;
		this.week = week;
		this.old_subject = old_subject;
		this.old_class = old_class;
		this.old_node = old_node;
		this.grade_name = grade_name;
		this.petitioner_id = petitioner_id;
		this.petitioner_name = petitioner_name;
		this.petitioner_subject = petitioner_subject;
		this.course_num = course_num;
		this.petitioner_date = petitioner_date;
		this.petitioner_week = petitioner_week;
		this.petitioner_gradename = petitioner_gradename;
		this.petitioner_class = petitioner_class;
		this.remarks = remarks;
		this.status = status;
		this.revocable = revocable;
		this.type = type;
		this.type2 = type2;
		this.createDate = createDate;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getSchool_id() {
		return school_id;
	}

	public void setSchool_id(String school_id) {
		this.school_id = school_id;
	}

	public String getTeacher_id() {
		return teacher_id;
	}

	public void setTeacher_id(String teacher_id) {
		this.teacher_id = teacher_id;
	}

	public String getTeacher_name() {
		return teacher_name;
	}

	public void setTeacher_name(String teacher_name) {
		this.teacher_name = teacher_name;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public Date getAdjust_date() {
		return adjust_date;
	}

	public void setAdjust_date(Date adjust_date) {
		this.adjust_date = adjust_date;
	}

	public String getWeek() {
		return week;
	}

	public void setWeek(String week) {
		this.week = week;
	}

	public String getOld_subject() {
		return old_subject;
	}

	public void setOld_subject(String old_subject) {
		this.old_subject = old_subject;
	}

	public String getOld_class() {
		return old_class;
	}

	public void setOld_class(String old_class) {
		this.old_class = old_class;
	}

	public Integer getOld_node() {
		return old_node;
	}

	public void setOld_node(Integer old_node) {
		this.old_node = old_node;
	}

	public String getGrade_name() {
		return grade_name;
	}

	public void setGrade_name(String grade_name) {
		this.grade_name = grade_name;
	}

	public String getPetitioner_id() {
		return petitioner_id;
	}

	public void setPetitioner_id(String petitioner_id) {
		this.petitioner_id = petitioner_id;
	}

	public String getPetitioner_name() {
		return petitioner_name;
	}

	public void setPetitioner_name(String petitioner_name) {
		this.petitioner_name = petitioner_name;
	}

	public String getPetitioner_subject() {
		return petitioner_subject;
	}

	public void setPetitioner_subject(String petitioner_subject) {
		this.petitioner_subject = petitioner_subject;
	}

	public Integer getCourse_num() {
		return course_num;
	}

	public void setCourse_num(Integer course_num) {
		this.course_num = course_num;
	}

	public Date getPetitioner_date() {
		return petitioner_date;
	}

	public void setPetitioner_date(Date petitioner_date) {
		this.petitioner_date = petitioner_date;
	}

	public String getPetitioner_week() {
		return petitioner_week;
	}

	public void setPetitioner_week(String petitioner_week) {
		this.petitioner_week = petitioner_week;
	}

	public String getPetitioner_gradename() {
		return petitioner_gradename;
	}

	public void setPetitioner_gradename(String petitioner_gradename) {
		this.petitioner_gradename = petitioner_gradename;
	}

	public String getPetitioner_class() {
		return petitioner_class;
	}

	public void setPetitioner_class(String petitioner_class) {
		this.petitioner_class = petitioner_class;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getRevocable() {
		return revocable;
	}

	public void setRevocable(Integer revocable) {
		this.revocable = revocable;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getType2() {
		return type2;
	}

	public void setType2(Integer type2) {
		this.type2 = type2;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	@Override
	public String toString() {
		return "AdjustBill [id=" + id + ", school_id=" + school_id + ", teacher_id=" + teacher_id + ", teacher_name="
				+ teacher_name + ", reason=" + reason + ", adjust_date=" + adjust_date + ", week=" + week
				+ ", old_subject=" + old_subject + ", old_class=" + old_class + ", old_node=" + old_node
				+ ", grade_name=" + grade_name + ", petitioner_id=" + petitioner_id + ", petitioner_name="
				+ petitioner_name + ", petitioner_subject=" + petitioner_subject + ", course_num=" + course_num
				+ ", petitioner_date=" + petitioner_date + ", petitioner_week=" + petitioner_week
				+ ", petitioner_gradename=" + petitioner_gradename + ", petitioner_class=" + petitioner_class
				+ ", remarks=" + remarks + ", status=" + status + ", revocable=" + revocable + ", type=" + type
				+ ", type2=" + type2 + ", createDate=" + createDate + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((adjust_date == null) ? 0 : adjust_date.hashCode());
		result = prime * result + ((course_num == null) ? 0 : course_num.hashCode());
		result = prime * result + ((createDate == null) ? 0 : createDate.hashCode());
		result = prime * result + ((grade_name == null) ? 0 : grade_name.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((old_class == null) ? 0 : old_class.hashCode());
		result = prime * result + ((old_node == null) ? 0 : old_node.hashCode());
		result = prime * result + ((old_subject == null) ? 0 : old_subject.hashCode());
		result = prime * result + ((petitioner_class == null) ? 0 : petitioner_class.hashCode());
		result = prime * result + ((petitioner_date == null) ? 0 : petitioner_date.hashCode());
		result = prime * result + ((petitioner_gradename == null) ? 0 : petitioner_gradename.hashCode());
		result = prime * result + ((petitioner_id == null) ? 0 : petitioner_id.hashCode());
		result = prime * result + ((petitioner_name == null) ? 0 : petitioner_name.hashCode());
		result = prime * result + ((petitioner_subject == null) ? 0 : petitioner_subject.hashCode());
		result = prime * result + ((petitioner_week == null) ? 0 : petitioner_week.hashCode());
		result = prime * result + ((reason == null) ? 0 : reason.hashCode());
		result = prime * result + ((remarks == null) ? 0 : remarks.hashCode());
		result = prime * result + ((revocable == null) ? 0 : revocable.hashCode());
		result = prime * result + ((school_id == null) ? 0 : school_id.hashCode());
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		result = prime * result + ((teacher_id == null) ? 0 : teacher_id.hashCode());
		result = prime * result + ((teacher_name == null) ? 0 : teacher_name.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		result = prime * result + ((type2 == null) ? 0 : type2.hashCode());
		result = prime * result + ((week == null) ? 0 : week.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AdjustBill other = (AdjustBill) obj;
		if (adjust_date == null) {
			if (other.adjust_date != null)
				return false;
		} else if (!adjust_date.equals(other.adjust_date))
			return false;
		if (course_num == null) {
			if (other.course_num != null)
				return false;
		} else if (!course_num.equals(other.course_num))
			return false;
		if (createDate == null) {
			if (other.createDate != null)
				return false;
		} else if (!createDate.equals(other.createDate))
			return false;
		if (grade_name == null) {
			if (other.grade_name != null)
				return false;
		} else if (!grade_name.equals(other.grade_name))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (old_class == null) {
			if (other.old_class != null)
				return false;
		} else if (!old_class.equals(other.old_class))
			return false;
		if (old_node == null) {
			if (other.old_node != null)
				return false;
		} else if (!old_node.equals(other.old_node))
			return false;
		if (old_subject == null) {
			if (other.old_subject != null)
				return false;
		} else if (!old_subject.equals(other.old_subject))
			return false;
		if (petitioner_class == null) {
			if (other.petitioner_class != null)
				return false;
		} else if (!petitioner_class.equals(other.petitioner_class))
			return false;
		if (petitioner_date == null) {
			if (other.petitioner_date != null)
				return false;
		} else if (!petitioner_date.equals(other.petitioner_date))
			return false;
		if (petitioner_gradename == null) {
			if (other.petitioner_gradename != null)
				return false;
		} else if (!petitioner_gradename.equals(other.petitioner_gradename))
			return false;
		if (petitioner_id == null) {
			if (other.petitioner_id != null)
				return false;
		} else if (!petitioner_id.equals(other.petitioner_id))
			return false;
		if (petitioner_name == null) {
			if (other.petitioner_name != null)
				return false;
		} else if (!petitioner_name.equals(other.petitioner_name))
			return false;
		if (petitioner_subject == null) {
			if (other.petitioner_subject != null)
				return false;
		} else if (!petitioner_subject.equals(other.petitioner_subject))
			return false;
		if (petitioner_week == null) {
			if (other.petitioner_week != null)
				return false;
		} else if (!petitioner_week.equals(other.petitioner_week))
			return false;
		if (reason == null) {
			if (other.reason != null)
				return false;
		} else if (!reason.equals(other.reason))
			return false;
		if (remarks == null) {
			if (other.remarks != null)
				return false;
		} else if (!remarks.equals(other.remarks))
			return false;
		if (revocable == null) {
			if (other.revocable != null)
				return false;
		} else if (!revocable.equals(other.revocable))
			return false;
		if (school_id == null) {
			if (other.school_id != null)
				return false;
		} else if (!school_id.equals(other.school_id))
			return false;
		if (status == null) {
			if (other.status != null)
				return false;
		} else if (!status.equals(other.status))
			return false;
		if (teacher_id == null) {
			if (other.teacher_id != null)
				return false;
		} else if (!teacher_id.equals(other.teacher_id))
			return false;
		if (teacher_name == null) {
			if (other.teacher_name != null)
				return false;
		} else if (!teacher_name.equals(other.teacher_name))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		if (type2 == null) {
			if (other.type2 != null)
				return false;
		} else if (!type2.equals(other.type2))
			return false;
		if (week == null) {
			if (other.week != null)
				return false;
		} else if (!week.equals(other.week))
			return false;
		return true;
	}

}
